package com.es.easystoragesimulatedata.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 电站数据模型
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("station_data")
public class StationData {
    
    @TableId(type = IdType.AUTO)
    private Long id;
    
    @JsonProperty("stationId")
    @TableField("station_id")
    private String stationId;
    
    @JsonProperty("stationName")
    @TableField("station_name")
    private String stationName;
    
    @JsonProperty("dataDate")
    @TableField("data_date")
    private LocalDate dataDate;
    
    @JsonProperty("gridUploadPower")
    @TableField("grid_upload_power")
    private BigDecimal gridUploadPower;
    
    @JsonProperty("gridDownloadPower")
    @TableField("grid_download_power")
    private BigDecimal gridDownloadPower;
    
    @JsonProperty("pcsEfficiency")
    @TableField("pcs_efficiency")
    private BigDecimal pcsEfficiency;
    
    @JsonProperty("circuitEfficiency")
    @TableField("circuit_efficiency")
    private BigDecimal circuitEfficiency;
    
    @JsonProperty("equivalentCycles")
    @TableField("equivalent_cycles")
    private BigDecimal equivalentCycles;
    
    @JsonProperty("revenue")
    private BigDecimal revenue;
    
    @JsonProperty("dataSource")
    @TableField("data_source")
    private DataSourceType dataSource;
    
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    
    @TableLogic
    @TableField("deleted")
    private Integer deleted;
}
